import pdfkit
from dotenv import load_dotenv
import os

load_dotenv("config.env")

config = pdfkit.configuration(wkhtmltopdf=os.getenv("path_to_wkhtmltopdf"))

pdfkit.from_file(
    input='result.html',
    output_path='output.pdf',
    configuration=config,
    options={
        'page-size': 'A4',
        'encoding': 'UTF-8',
        'no-outline': None,
    }
)
